# -*- coding: utf-8 -*-
def calc(a,b):
    return a+b
print(calc(10,20))

#匿名函数
s=lambda a,b:a+b
print(type(s))
print(s(10,20))
print('-'*30)

lst=[10,20,30]
for i in range(len(lst)):
    result = lambda  x:x[i]
    print(result(lst))

student_scores=[ {'name':'陈梅梅','score':98},
    {'name' :'消化','score':97},
    {'name':'哈哈','score':66}]
student_scores.sort(key=lambda x:x.get('score'),reverse = True)
print(student_scores)